package com.example.demo.jackson;

import com.example.demo.user.UserVo;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.math.BigDecimal;

/**
 * 类描述：
 *
 * @author: huxinchao  38653
 * Create Date：
 * <p>
 * History:      huxinchao   Created.
 */
public class TestJackson {
    public static void main(String[] args) {
        ObjectMapper mapper = new ObjectMapper();
        UserVo vo = new UserVo();
        vo.setXx(new BigDecimal(1));
        try {
            String value = mapper.writeValueAsString(vo);
            System.out.println(value);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
    }
}
